{include 'admin/layout/header'}
<link rel="stylesheet" href="__ADMIN_STATIC__/css/setting.css?random={extendSetting('random')}">
<link rel="stylesheet" href="__ADMIN_STATIC__/css/addContent.css?random={extendSetting('random')}">
<div class="content">
    <form class="ajaxForm" method="post" >
        <ul class="content-info1">
            <input type="hidden" name="pid" value="{$pid}" />
            <li style="border-bottom: 1px solid rgb(221, 221, 221);background-color: #F5F5F5;">
                <p class="sclip article-status" style="">
                <span style="font-weight: bold;font-size: 14px;">网站设置</span>
                </p>
            </li>
            <li class="scli">
                <span>资源随机数</span>
                <p class="sclip article-status">
                    {if isset($rowData['random'])}{$rowData['random']}{/if}<span onclick="runApi(this)" title="更新随机数"  data-close="3" data-submit-url="/api/setting/store?op=random&pid={$pid}" data-method="post" style="color: #007AFF;cursor: pointer;margin-left:10px;">更新</span>
                </p>
            </li>
            <li class="scli">
                <span>手机版设置</span>
                <p class="sclip article-status">
                    <input name="setting[mobile_enable]" value="1" type="radio" {if (isset($rowData['mobile_enable']) && $rowData['mobile_enable']=='1') } checked  {/if} >开启
                    <input name="setting[mobile_enable]" value="0" type="radio" {if (isset($rowData['mobile_enable']) && $rowData['mobile_enable']=='0') } checked  {/if} >关闭
                </p>
            </li>
            <!--<li style="border-bottom: 1px solid rgb(221, 221, 221);background-color: #F5F5F5;">-->
                <!--<p class="sclip article-status" style="">-->
                <!--<span style="font-weight: bold;font-size: 14px;">url伪静态</span>-->
                <!--</p>-->
            <!--</li>-->
            <!--<span class="switchContainer">-->
                <!--<li class="scli">-->
                    <!--<span>列表页生成html</span>-->
                    <!--<p class="sclip article-status">-->
                        <!--<input class="switch_btn" data-index="1" name="setting[listHtml]" value="1" type="radio" {if (isset($rowData['listHtml']) && $rowData['listHtml']=='1') } checked  {/if} >是-->
                        <!--<input class="switch_btn" data-index="2" name="setting[listHtml]" value="0" type="radio" {if (isset($rowData['listHtml']) && $rowData['listHtml']=='0') } checked  {/if} >否-->
                    <!--</p>-->
                <!--</li>-->
                <!--<span class="switchBox switch_box_1" {if (isset($rowData['listHtml']) && $rowData['listHtml']!='1') }style="display:none;"{else}style="display:block;"{/if} >-->
                    <!--<li class="scli">-->
                        <!--<span>HTML列表页文件名前缀</span>-->
                        <!--<p class="sclip">-->
                            <!--<input type="text" name="setting[htm_list_prefix]" value="{$rowData['htm_list_prefix']??''}" >-->
                        <!--</p>-->
                    <!--</li>-->
                    <!--<li class="scli">-->
                        <!--<span>HTML列表页地址规则</span>-->
                        <!--<p class="sclip article-status">-->
                            <!--<select name="setting[htmlListUrlRule]" class="midium">-->
                                <!--{foreach $settingData["listUrlRule"]["htm"]["list"] $key $val}-->
                                    <!--<option {if (isset($rowData['htmlListUrlRule']) && $rowData['htmlListUrlRule']==$key) } selected  {/if} value="{$key}">{$val['example']}</option>-->
                                <!--{/foreach}-->
                            <!--</select>-->
                        <!--</p>-->
                    <!--</li>-->
                <!--</span>-->
                <!--<span class="switchBox switch_box_2" {if (isset($rowData['listHtml']) && $rowData['listHtml']!='0') }style="display:none;"{else}style="display:block;"{/if} >-->
                    <!--<li class="scli">-->
                        <!--<span>PHP列表页地址规则</span>-->
                        <!--<p class="sclip article-status">-->
                            <!--<select name="setting[listUrlRule]" class="midium">-->
                                <!--{foreach $settingData["listUrlRule"]["php"]["list"] $key $val}-->
                                <!--<option {if (isset($rowData['listUrlRule']) && $rowData['listUrlRule']==$key) } selected  {/if} value="{$key}">{$val['example']}</option>-->
                                <!--{/foreach}-->
                            <!--</select>-->
                        <!--</p>-->
                    <!--</li>-->
                <!--</span>-->
            <!--</span>-->
            <!--<span class="switchContainer">-->
                <!--<li class="scli">-->
                    <!--<span>内容页生成html</span>-->
                    <!--<p class="sclip article-status">-->
                        <!--<input class="switch_btn" data-index="3" name="setting[conHtml]"  value="1" type="radio" {if (isset($rowData['conHtml']) && $rowData['conHtml']=='1') } checked  {/if} >是-->
                        <!--<input class="switch_btn" data-index="4" name="setting[conHtml]"  value="0" type="radio" {if (isset($rowData['conHtml']) && $rowData['conHtml']=='0') } checked  {/if} >否-->
                    <!--</p>-->
                <!--</li>-->
                <!--<span class="switchBox switch_box_3" {if (isset($rowData['conHtml']) && $rowData['conHtml']!='1') }style="display:none;"{else}style="display:block;"{/if} >-->
                    <!--<li class="scli">-->
                        <!--<span>HTML内容页文件名前缀</span>-->
                        <!--<p class="sclip article-status">-->
                            <!--<input type="text" name="setting[htm_item_prefix]" value="{$rowData['htm_item_prefix']??''}" >-->
                        <!--</p>-->
                    <!--</li>-->
                    <!--<li class="scli">-->
                        <!--<span>HTML内容页地址规则</span>-->
                        <!--<p class="sclip article-status">-->
                            <!--<select name="setting[htmlConUrlRule]" class="midium">-->
                                <!--{foreach $settingData["listUrlRule"]["htm"]["item"] $key $val}-->
                                    <!--<option {if (isset($rowData['htmlConUrlRule']) && $rowData['htmlConUrlRule']==$key) } selected  {/if} value="{$key}">{$val['example']}</option>-->
                                <!--{/foreach}-->
                            <!--</select>-->
                        <!--</p>-->
                    <!--</li>-->
                <!--</span>-->
                <!--<span class="switchBox switch_box_4" {if (isset($rowData['conHtml']) && $rowData['conHtml']!='0') }style="display:none;"{else}style="display:block;"{/if} >-->
                    <!--<li class="scli">-->
                        <!--<span>PHP内容页地址规则</span>-->
                        <!--<p class="sclip article-status">-->
                            <!--<select name="setting[conUrlRule]" class="midium">-->
                                <!--{foreach $settingData["listUrlRule"]["php"]["item"] $key $val}-->
                                <!--<option {if (isset($rowData['conUrlRule']) && $rowData['conUrlRule']==$key) } selected  {/if} value="{$key}">{$val['example']}</option>-->
                                <!--{/foreach}-->
                            <!--</select>-->
                        <!--</p>-->
                    <!--</li>-->
                <!--</span>-->
            <!--</span>-->
            <li style="border-bottom: 1px solid rgb(221, 221, 221);background-color: #F5F5F5;">
                <p class="sclip article-status" style="">
                <span style="font-weight: bold;font-size: 14px;">sitemaps</span>
                </p>
            </li>
            <li class="scli">
                <span>生成sitemaps</span>
                <p class="sclip article-status">
                    <input name="setting[sitemaps]" value="1" type="radio" {if (isset($rowData['sitemaps']) && $rowData['sitemaps']=='1') } checked  {/if} >开启
                    <input name="setting[sitemaps]" value="0" type="radio" {if (isset($rowData['sitemaps']) && $rowData['sitemaps']=='0') } checked  {/if} >关闭
                </p>
            </li>
            <li class="scli">
                <span>内容页更新频率</span>
                <p class="sclip article-status">
                    <select name="setting[sitemaps_changefreq]" >
                        <option value="always" {if (isset($rowData['sitemaps_changefreq']) && $rowData['sitemaps_changefreq']=="always") } selected  {/if} >一直</option>
                        <option value="hourly" {if (isset($rowData['sitemaps_changefreq']) && $rowData['sitemaps_changefreq']=="hourly") } selected  {/if} >时</option>
                        <option value="daily" {if (isset($rowData['sitemaps_changefreq']) && $rowData['sitemaps_changefreq']=="daily") } selected  {/if} >日</option>
                        <option value="weekly" {if (isset($rowData['sitemaps_changefreq']) && $rowData['sitemaps_changefreq']=="weekly") } selected  {/if} >周</option>
                        <option value="monthly" {if (isset($rowData['sitemaps_changefreq']) && $rowData['sitemaps_changefreq']=="monthly") } selected  {/if} >月</option>
                        <option value="yearly" {if (isset($rowData['sitemaps_changefreq']) && $rowData['sitemaps_changefreq']=="yearly") } selected  {/if} >年</option>
                        <option value="never" {if (isset($rowData['sitemaps_changefreq']) && $rowData['sitemaps_changefreq']=="never") } selected  {/if} >从不</option>
                    </select>
                    <select name="setting[sitemaps_priority]" >
                        <option value="1.0" {if (isset($rowData['sitemaps_priority']) && $rowData['sitemaps_priority']=="1.0") } selected  {/if} >1.0</option>
                        <option value="0.9" {if (isset($rowData['sitemaps_priority']) && $rowData['sitemaps_priority']=="0.9") } selected  {/if} >0.9</option>
                        <option value="0.8" {if (isset($rowData['sitemaps_priority']) && $rowData['sitemaps_priority']=="0.8") } selected  {/if} >0.8</option>
                        <option value="0.7" {if (isset($rowData['sitemaps_priority']) && $rowData['sitemaps_priority']=="0.7") } selected  {/if} >0.7</option>
                        <option value="0.6" {if (isset($rowData['sitemaps_priority']) && $rowData['sitemaps_priority']=="0.6") } selected  {/if} >0.6</option>
                        <option value="0.5" {if (isset($rowData['sitemaps_priority']) && $rowData['sitemaps_priority']=="0.5") } selected  {/if} >0.5</option>
                        <option value="0.4" {if (isset($rowData['sitemaps_priority']) && $rowData['sitemaps_priority']=="0.4") } selected  {/if} >0.4</option>
                        <option value="0.3" {if (isset($rowData['sitemaps_priority']) && $rowData['sitemaps_priority']=="0.3") } selected  {/if} >0.3</option>
                        <option value="0.2" {if (isset($rowData['sitemaps_priority']) && $rowData['sitemaps_priority']=="0.2") } selected  {/if} >0.2</option>
                        <option value="0.1" {if (isset($rowData['sitemaps_priority']) && $rowData['sitemaps_priority']=="0.1") } selected  {/if} >0.1</option>
                    </select>
                </p>
            </li>
            <li class="scli">
                <span>允许生成的模块</span>
                <p class="sclip article-status">
                    {LTcms:models module='article' isLink="0" }
                    <input type="checkbox"  name="setting[sitemaps_module][]" value="{$field['id']}"  {if ($rowData['sitemaps_module'] && in_array($field['id'],explode(",",$rowData['sitemaps_module']))) } checked {/if} >{$field["name"]}
                    {/LTcms:models}
                </p>
            </li>
            <li class="scli">
                <span>更新周期</span>
                <p class="sclip article-status">
                    <input type="text" name="setting[sitemaps_update]" value="{$rowData['sitemaps_update']??''}" >分钟
                </p>
            </li>
            <li class="scli">
                <span>生成数量</span>
                <p class="sclip article-status">
                    <input type="text" name="setting[sitemaps_items]" value="{$rowData['sitemaps_items']??''}" >
                </p>
            </li>
            <li class="scli">
                <span>URL地址</span>
                <div class="sclip article-status">
                    {php $publicPath=publicPath(); }
                    {php $sitemaps_xml=$publicPath.config("sitemaps.sitemaps_xml"); }
                    {php $sitemaps_txt=$publicPath.config("sitemaps.sitemaps_txt"); }
                    {php $sitemaps_html=$publicPath.config("sitemaps.sitemaps_html"); }
                    {if $sitemaps_xml && is_file($sitemaps_xml) }
                    <p style="margin-right:10px;" >
                        <span style="font-size: 14px;font-weight: bold;width:300px;" >xml地址：{date("Y-m-d H:i:s",filemtime($sitemaps_xml))}</span>
                        <a target="_blank" href="{config("app.url")}/{config("sitemaps.sitemaps_xml","")}" style="cursor: pointer;">{config("app.url")}/{config("sitemaps.sitemaps_xml","")}</a>
                    </p>
                    {/if}
                    {if $sitemaps_txt && is_file($sitemaps_txt) }
                    <p style="margin-right:10px;" >
                        <span style="font-size: 14px;font-weight: bold;width:300px;" >txt地址：{date("Y-m-d H:i:s",filemtime($sitemaps_txt))}</span>
                        <a target="_blank" href="{config("app.url")}/{config("sitemaps.sitemaps_txt","")}" style="cursor: pointer;">{config("app.url")}/{config("sitemaps.sitemaps_txt","")}</a>
                    </p>
                    {/if}
                    {if $sitemaps_html && is_file($sitemaps_html) }
                    <p>
                        <span style="font-size: 14px;font-weight: bold;width:300px;" >html地址：{date("Y-m-d H:i:s",filemtime($sitemaps_html))}</span>
                        <a target="_blank" href="{config("app.url")}/{config("sitemaps.sitemaps_html","")}" style="cursor: pointer;">{config("app.url")}/{config("sitemaps.sitemaps_html","")}</a>
                    </p>
                    {/if}
                </div>
            </li>
            <li class="scli">
                <span>操作</span>
                <div class="sclip article-status">
                    <div>
                        定时任务地址：{config("app.url")}/api/sitemaps/store <hr />
                        <span onclick="runApi(this)" title="更新站点地图"  data-close="3" data-submit-url="/api/sitemaps/store" data-method="post" style="color: #007AFF;cursor: pointer;margin-left:10px;">立即更新</span>
                    </div>
                </div>
            </li>
            <li class="scli">
                <span>详细了解Sitemaps?</span>
                <p class="sclip article-status">
                    <a target="_blank" href="https://sitemaps.org/protocol.html" style="cursor: pointer;">https://sitemaps.org/protocol.html</a>
                </p>
            </li>
            <!--<li class="scli">-->
                <!--<span>插件-退款时间</span>-->
                <!--<p class="sclip article-status">-->
                    <!--<input type="number" name="setting[plugin_time_diff]" value="{$rowData['plugin_time_diff']??''}"> 单位：秒（购买多少时间内可以退款）-->
                <!--</p>-->
            <!--</li>-->
        </ul>
        <div class="ltcms-button">
            <button class="btns submit ajaxBtn" type="button" data-form=".ajaxForm" data-close="4" data-submit-url="{LTCMS_ROUTE_PREFIX}/setting/recordBatch" >确认提交</button>
        </div>
    </form>
</div>
{include 'admin/layout/file_upload_script_auto'}
{include 'admin/layout/footer'}